package com.yipei.business.service.impl;

import java.util.List;
import com.yipei.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yipei.business.mapper.MlStopTradeSymbolMapper;
import com.yipei.business.domain.MlStopTradeSymbol;
import com.yipei.business.service.IMlStopTradeSymbolService;

/**
 * 禁止交易Service业务层处理
 * 
 * @author yipei
 * @date 2024-12-23
 */
@Service
public class MlStopTradeSymbolServiceImpl implements IMlStopTradeSymbolService 
{
    @Autowired
    private MlStopTradeSymbolMapper mlStopTradeSymbolMapper;

    /**
     * 查询禁止交易
     * 
     * @param id 禁止交易主键
     * @return 禁止交易
     */
    @Override
    public MlStopTradeSymbol selectMlStopTradeSymbolById(Long id)
    {
        return mlStopTradeSymbolMapper.selectMlStopTradeSymbolById(id);
    }

    /**
     * 查询禁止交易列表
     * 
     * @param mlStopTradeSymbol 禁止交易
     * @return 禁止交易
     */
    @Override
    public List<MlStopTradeSymbol> selectMlStopTradeSymbolList(MlStopTradeSymbol mlStopTradeSymbol)
    {
        return mlStopTradeSymbolMapper.selectMlStopTradeSymbolList(mlStopTradeSymbol);
    }

    /**
     * 新增禁止交易
     * 
     * @param mlStopTradeSymbol 禁止交易
     * @return 结果
     */
    @Override
    public int insertMlStopTradeSymbol(MlStopTradeSymbol mlStopTradeSymbol)
    {
        mlStopTradeSymbol.setCreateTime(DateUtils.getNowDate());
        return mlStopTradeSymbolMapper.insertMlStopTradeSymbol(mlStopTradeSymbol);
    }

    /**
     * 修改禁止交易
     * 
     * @param mlStopTradeSymbol 禁止交易
     * @return 结果
     */
    @Override
    public int updateMlStopTradeSymbol(MlStopTradeSymbol mlStopTradeSymbol)
    {
        mlStopTradeSymbol.setUpdateTime(DateUtils.getNowDate());
        return mlStopTradeSymbolMapper.updateMlStopTradeSymbol(mlStopTradeSymbol);
    }

    /**
     * 批量删除禁止交易
     * 
     * @param ids 需要删除的禁止交易主键
     * @return 结果
     */
    @Override
    public int deleteMlStopTradeSymbolByIds(Long[] ids)
    {
        return mlStopTradeSymbolMapper.deleteMlStopTradeSymbolByIds(ids);
    }

    /**
     * 删除禁止交易信息
     * 
     * @param id 禁止交易主键
     * @return 结果
     */
    @Override
    public int deleteMlStopTradeSymbolById(Long id)
    {
        return mlStopTradeSymbolMapper.deleteMlStopTradeSymbolById(id);
    }
}
